bitkeeper revision 1.396 (3f4d2199UsCzVuRmn-0-L6lh9VGYZg)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 27 Aug 2003 21:24:41 +0000 (21:24 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Wed, 27 Aug 2003 21:24:41 +0000 (21:24 +0000)
Many files:
  Small cleanups. Faster checksum calculation for console UDP packets.

Makefile
xen/TODO
xen/common/domain.c
xen/common/kernel.c
xen/common/schedule.c
xen/common/timer.c
xen/tools/elf-reloc.c
xen/tools/figlet/figlet.c

index c4ad717e5e838134dee34ba8330aff4c393ca822..725d615849a56359732fcc974bf77870e6ae7008 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@
 # the latest Java 2 SDK on your execution path: <http://java.sun.com>
 # Also, you will need Apache's 'ant' build tool: <http://ant.apache.org>
 #
-# If you received this sourec as part of a Xen release, you should find
+# If you received this source as part of a Xen release, you should find
 # that appropriate versions of the build tools are already installed in
 # the initial system setup.
 
index e5df50ac5b3e0fc49ba89a78e3be7264fb175286..5eead81b89891537abb5d09f884a520fb3b7dee0 100644 (file)
--- a/xen/TODO
+++ b/xen/TODO
@@ -1,19 +1,15 @@
 
-This is stuff we probably want to implement in the near future. I
-think I have them in a sensible priority order -- the first few would
-be nice to fix before a code release. The later ones can be
-longer-term goals.
+This is stuff we probably want to implement in the near future.
 
  -- Keir (16/3/03)
 
 
-1. ACCURATE TIMERS AND WALL-CLOCK TIME
---------------------------------------
-Currently our long-term timebase free runs on CPU0, with no external
-calibration. We should run ntpd on domain 0 and allow this to warp
-Xen's timebase. Once this is done, we can have a timebase per CPU and
-not worry about relative drift (since they'll all get sync'ed
-periodically by ntp).
+1. DOMAIN-0 MANAGEMENT DAEMON
+-----------------------------
+A better control daemon is required for domain 0, which keeps proper
+track of machine resources and can make sensible policy choices. This
+may require support in Xen; for example, notifications (eg. DOMn is
+killed), and requests (eg. can DOMn allocate x frames of memory?).
 
 2. ASSIGNING DOMAINS TO PROCESSORS
 ----------------------------------
@@ -27,42 +23,11 @@ relationships between processors in the system (eg. which ones are
 siblings in the same package). We then use this to balance domains
 across packages, and across virtual processors within a package.
 
-3. DOMAIN 0 MANAGEMENT DAEMON
------------------------------
-A better control daemon is required for domain 0, which keeps proper
-track of machine resources and can make sensible policy choices. This
-may require support in Xen; for example, notifications (eg. DOMn is
-killed), and requests (eg. can DOMn allocate x frames of memory?).
-
-4. SANE NETWORK ROUTING
+3. SANE NETWORK ROUTING
 -----------------------
 The current virtual firewall/router is completely broken. Needs a new
 design and implementation!
 
-5. NETWORK CHECKSUM OFFLOAD 
---------------------------- 
-All the NICs that we support can checksum packets on behalf of guest
-OSes. We need to add appropriate flags to and from each domain to
-indicate, on transmit, which packets need the checksum added and, on
-receive, which packets have been checked out as okay. We can steal
-Linux's interface, which is entirely sane given NIC limitations.
-
-6. MODULE SUPPORT FOR XEN
--------------------------
-Network and blkdev drivers are bloating Xen. At some point we want to
-build drivers as modules, stick them in a cheesy ramfs, then relocate
-them one by one at boot time. If a driver duccessfully probes hardware
-we keep it, otherwise we blow it away. Alternative is to have a
-central PCI ID to driver name repository. We then use that to decide
-which drivers to load.
-
-Most of the hard stuff (relocating and the like) is done for us by
-Linux's module system.
-
-7. NEW DESIGN FEATURES
-----------------------
-This includes the last-chance page cache, and the unified buffer cache.
-
 
 
 Graveyard
index de004b0d9deac3796719ef3f17ebbc6c169cb804..029ed12e5718dd66d0a7b71fd8fbd5d76309f7b4 100644 (file)
@@ -671,12 +671,13 @@ int setup_guestos(struct task_struct *p, dom0_newdomain_t *params,
         ((p->tot_pages - 1) << PAGE_SHIFT); 
 
     virt_startinfo_address->dom_id = p->domain;
-    virt_startinfo_address->flags  = IS_PRIV(p) ? SIF_PRIVILEGED : 0;
-    // guest os can have console if:
-    // 1) its privileged (need iopl right now)
-    // 2) its the owner of the console (and therefore will get kbd/mouse events)
-    // 3) xen hasnt tried to touch the console (see console.h)
-    virt_startinfo_address->flags |= (IS_PRIV(p) && CONSOLE_ISOWNER(p) ) ? SIF_CONSOLE : 0;
+    virt_startinfo_address->flags  = 0;
+    if ( IS_PRIV(p) )
+    {
+        virt_startinfo_address->flags |= SIF_PRIVILEGED;
+        if ( CONSOLE_ISOWNER(p) )
+            virt_startinfo_address->flags |= SIF_CONSOLE;
+    }
 
     if ( initrd_len )
     {
@@ -717,10 +718,10 @@ int setup_guestos(struct task_struct *p, dom0_newdomain_t *params,
     }
     *dst = '\0';
 
-    /* If this guy's getting the console we'd better let go */
+    /* If this guy's getting the console we'd better let go. */
     if ( virt_startinfo_address->flags & SIF_CONSOLE )
     {
-        // should reset the console, but seems to work anyhow...
+        /* NB. Should reset the console here. */
         opt_console = 0;
     }  
 
index 08c3213192d785d50f2ff22dc38a46581d6f7691..10a7555eee47d3cfcee3c8795623640f1f9e309f 100644 (file)
@@ -458,25 +458,12 @@ asmlinkage long sys_ni_syscall(void)
 
 unsigned short compute_cksum(unsigned short *buf, int count)
 {
-       /* Function written by ek247
-        * Computes IP and UDP checksum.
-        * To be used for the fake console packets
-        * created in console_export
-        */
-
-    unsigned long sum=0;
-
-    while (count--)
-    {
-        sum+=*buf++;
-        if (sum & 0xFFFF0000)
-        {
-            //carry occured, so wrap around
-            sum &=0xFFFF;
-            sum++;
-        }
-    }
-    return ~(sum & 0xFFFF);
+    unsigned long sum = 0;
+    while ( count-- )
+        sum += *buf++;
+    sum += sum >> 16;
+    sum += sum >> 16;
+    return (unsigned short)~sum;
 }
 
 
index 06f66518d420c769c7141283bc05fcf52f66ef70..94acfdc338f93d1557cc65896c3895f254b843d3 100644 (file)
@@ -171,7 +171,6 @@ int wake_up(struct task_struct *p)
 
     p->state = TASK_RUNNING;
     __add_to_runqueue_head(p);
-    //__add_to_runqueue_tail(p);
 
     /* set the BVT parameters */
     if (p->avt < schedule_data[p->processor].svt)
index 20d45ccbe664d4223d2e098e2e3011393535ae25..ebc7f8d3b03b8cb3b012e21187dc2c2c12de6b4b 100644 (file)
@@ -280,7 +280,7 @@ static inline void cascade_timers(struct timer_vec *tv)
 
                tmp = list_entry(curr, struct timer_list, list);
                next = curr->next;
-               list_del(curr); // not needed
+               list_del(curr); /* not needed */
                internal_add_timer(tmp);
                curr = next;
        }
@@ -509,18 +509,12 @@ static void update_wall_time(unsigned long ticks)
 static inline void do_process_times(struct task_struct *p,
        unsigned long user, unsigned long system)
 {
-    //unsigned long psecs;
-
-//     psecs = (p->times.tms_utime += user);
-       //psecs += (p->times.tms_stime += system);
 }
 
 
 void update_one_process(struct task_struct *p, unsigned long user,
                        unsigned long system, int cpu)
 {
-//     p->per_cpu_utime[cpu] += user;
-//     p->per_cpu_stime[cpu] += system;
        do_process_times(p, user, system);
 }      
 
index 19a839ee84aea348826560a8d46b63de9d219501..80e926f29eb4b9899593297db380683ea17d3f62 100644 (file)
@@ -4,7 +4,7 @@
  * Usage: elf-reloc <old base> <new base> <image>
  * 
  * Relocates <image> from <old base> address to <new base> address by
- * frobbing the Elf headers. Segment contents are unmodified!
+ * frobbing the Elf headers. Segment contents are unmodified.
  */
 
 #include <stdio.h>
index 36cf7509c0f0d487ada2e1cd7180f2360b88637a..8e79e831707958c2e24c0e6b93d38a30b7236f6c 100644 (file)
@@ -5,9 +5,9 @@
  * This is a HACKED figlet source file for Xen.
  * 
  * Hacked to output C octal strings for inclusion in a header file.
- * Support for opening zippe files is removed.
+ * Support for opening zipped files is removed.
  * 
- * Go to www.figlet.org for teh unhacked Figlet sources!
+ * Go to www.figlet.org for the unhacked Figlet sources.
  */
 
 /****************************************************************************